package com.moorror.codegenvel.view.component;

import com.intellij.openapi.project.Project;
import com.moorror.codegenvel.common.tree.MTTreeCell;
import com.moorror.codegenvel.view.window.history.HistoryDataTabContent;

import javax.swing.*;

/**
 * @Author jiyanghuang
 * @Date 2024/4/11 23:01
 */
public class CommonHistoryTab extends AbstractCodeGenByVelocitySetTab {

    public static final String NAME = "CommonHistory";

    private final String type;

    private HistoryDataTabContent content;

    public CommonHistoryTab(Project project, String type){
        super(project);
        this.type = type;
    }
    @Override
    public String tabName() {
        return NAME;
    }

    @Override
    public JComponent subJComponent(String tabId) {
        this.content = new HistoryDataTabContent(project, this, tabId, type);
        return content;
    }

    public MTTreeCell currentSelect(){
        return this.content.currentSelect();
    }
}
